package com.design03_behavioral.pattern22_interpreter.example01;

/**
 * @ClassName Client
 * @Description TODO
 * @Author 22963
 * @DATE 2023/9/11 0:21
 */
public class Client {

    public static void main(String[] args) {
        ExpressionInterpreter expressionInterpreter = new ExpressionInterpreter();
        //会报异常,因为之前的写法会存在空指针
        long interpret = expressionInterpreter.interpret("9 5 7 3 + - *");
        System.out.println(interpret);
        //33
    }

}
